<?php


namespace App\factory;
class Factory
{
    /**
     * @param $data
     * @return \Symfony\Component\HttpFoundation\Response|void
     * @throws \Exception
     * 支付工厂
     */
     public static function factoryPay($data){
             switch ($data['type']){
                 case 1 : return Blance::payType($data); break;
                 case 2 : return Ali::payType($data);break;
                 case 3 : return Wecht::payType($data);break;
                 default: throw new \Exception('其余支付功能正在开发');
             }
     }

    /**
     * @param $data
     * @throws \Exception
     * 提现
     */
     public static function extract($data){
         switch ($data['extract_type']){
             case 'bank': return Bank::payExtract($data); break;
             default: throw new \Exception('其余提现功能正在开发');break;
         }
     }
}
